package com.daatak.mvc.common;

import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.Locale;

public class CurrencyFormatter {
	private static Locale currentLocale = new Locale.Builder().setLanguage("en").setRegion("US").build();
	private static NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(currentLocale);
	private static NumberFormat  percentFormatter = NumberFormat.getPercentInstance(currentLocale);
	
	static public String formatCurrency(BigDecimal currency) {
		return currencyFormatter.format(currency);
	}
	
	static public String formatPercentage(BigDecimal currency) {
		return percentFormatter.format(currency);
	}

}
